In a virtualization environment, a processor and/or a device and/or interface may be shared by a plurality of guests. A single physical processor may be configured as a plurality of virtual CPUs. Each virtual CPU may be configured to share the physical processor resources with other virtual CPU(s). A guest may include a virtual CPU and a guest process configured to execute on the virtual CPU. Similarly, a single physical device and/or interface may be configured as a plurality of virtual devices and/or interfaces, with each virtual device and/or interface configured to share the resources of the device and/or interface with other virtual device(s) and/or interface(s).
One technique for sharing resources includes sharing processor resources in “time slices”. In other words, for a plurality of guests, a subset of the plurality may be active at any point in time. As used herein, “active” means executing on at least a portion of a processor. A virtual machine monitor (“VMM”) may be configured to manage scheduling guest access to the processor. The VMM may schedule a guest in (“active”) or schedule a guest out (“inactive”) based on time, e.g., at particular time intervals. The VMM may also be configured to schedule a guest in or out in response to an “event”, e.g., an interrupt from the device.
Interrupt frequency may depend on the type of device and/or interface and/or the number of virtual devices and/or interfaces active on the device and/or interface. For example, a network adapter may be configured to interrupt a host to indicate that packets have been received. Depending on the speed of the adapter and/or the number of active virtual devices and/or interfaces and network traffic, i.e., frequency at which packets are received, a network adapter may interrupt relatively frequently.
Although the following Detailed Description will proceed with reference being made to illustrative embodiments, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art.